# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-cangjie
pkgver=0.7.4_git20230218
_gitrev=d6882e15f47fdde37e9f739dde604d77d25f11db
pkgrel=0
_pkgreal=cangjie
pkgdesc="Lookup Cangjie encoding of a Han character"
url="https://github.com/kisaragi-hiu/cangjie.el"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	emacs-dash
	emacs-f
	emacs-s
	"
makedepends="emacs-nox"
source="https://github.com/kisaragi-hiu/cangjie.el/archive/$_gitrev/emacs-cangjie-$_gitrev.tar.gz"
builddir="$srcdir/cangjie.el-$_gitrev"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
3b35b7cb777ea7781ed987970ecd956a05b26ac92b12940c1f7240ebcffd1cb6aab4e6d7fec82ab335acd7bacbc2a9d1f160aba32f0cf605cf03726c24fc15c3  emacs-cangjie-d6882e15f47fdde37e9f739dde604d77d25f11db.tar.gz
"
